package main

import (
	"chapter2/src/chapter2"
)
/**
 * Created with IntelliJ IDEA.
 * User: 令狐飞侠
 * Date: 2021-11-29
 * Description: gorm测试 驱动函数
 */
func main() {
	chapter2.ConnectDb()
    defer chapter2.CloseDb()

	//新增用户
	//chapter2.InsertUser()

	//查询用户
	//chapter2.SelectUser()

	//条件查询用户
	//chapter2.SelectUserByUserName("令狐冲")

	//修改用户
	//chapter2.UpdateUser(1, "999")

	//删除用户
	//chapter2.DeleteUser(1)
}
